<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.qq.model.User" %>
<%
    String path = request.getContextPath();
    User user = (User)session.getAttribute("USER");
%>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
    <a class="navbar-brand" href="#">图书管理系统</a>

    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link" href="#">首页 <span class="sr-only">(current)</span></a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#">设置</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="#" tabindex="-1" aria-disabled="true">书籍</a>
            </li>
        </ul>

        <ul class="navbar-nav">
            <li class="nav-item active">
                <a class="nav-link" href="#">用户名：<%=user.getName()%> </a>
            </li>
            <li class="nav-item">
                <a href="<%=path%>/logout" class="btn btn-sm btn-danger">注销</a>
            </li>
        </ul>
        &nbsp;&nbsp;&nbsp;&nbsp;
        <form class="form-inline my-2 my-lg-0">
            <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
            <button class="btn btn-sm btn-outline-success my-2 my-sm-0" type="submit">Search</button>
        </form>
    </div>
</nav>
